<template>
  <!-- hvps112明细-->
  <el-dialog :title="title" center :visible.sync="openState" width="1024px" :close-on-click-modal="false">
    <el-form ref="queryform111" :model="form" label-width="110px" :disabled="true">
      <!--交易础信息-->
      <el-card class="form-card txnInfo-card">
        <div slot="header" class="label-header-msg">
          <span>交易基础信息</span>
        </div>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="交易流水号" prop="id">
              <el-input v-model="form.id" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="明细标识号" prop="dtlNo">
              <el-input v-model="form.dtlNo" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="包批次号" prop="btId">
              <el-input v-model="form.btId" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="报文标识号" prop="pkgId">
              <el-input v-model="form.pkgId" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="行内流水号" prop="internalId1">
              <el-input v-model="form.internalId1" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="来源" prop="source">
              <el-select style="width: 100%" v-model="form.source" placeholder="柜面交易">
                <el-option
                  v-for="dict in dictMap.TXN_SOURCE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="CPG日期" prop="cpgdate">
              <el-date-picker v-model="form.vdate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="工作日期" prop="workdate">
              <el-date-picker v-model="form.workdate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="转发日期" prop="npcSndDate">
              <el-date-picker v-model="form.npcSndDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="回执期限" prop="bizRtrltd">
              <el-input v-model="form.bizRtrltd" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="业务类型" prop="bizTypeCode">
              <el-select
                style="width: 100%"
                v-model="
                  form.bizTypeCode === null || form.bizTypeCode === undefined
                    ? ''
                    : form.bizTypeCode + '-' + form.bizTypeCodeDesc
                "
                placeholder="业务类型"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="业务种类" prop="bizCtgyCode">
              <el-select
                style="width: 100%"
                v-model="
                  form.bizCtgyCode === null || form.bizCtgyCode === undefined
                    ? ''
                    : form.bizCtgyCode + '-' + form.bizCtgyCodeDesc
                "
                placeholder="原业务类型"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="交易币种" prop="curcd">
              <el-input v-model="form.curcd" placeholder="货币种类" :disabled="true"  />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="金额" prop="amount">
              <ht-amount-input v-model="form.amount" placeholder="交易金额" ></ht-amount-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="附言" prop="remark">
              <el-input type="textarea" v-model="form.remark" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="地域标识" prop="regionid">
              <el-select style="width: 100%;" v-model="form.regionid" placeholder="地域标识">
                <el-option
                  v-for="dict in dictMap.RegionId"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="账户类型" prop="custflag1">
              <el-select v-model="form.custflag1" placeholder="账户类型">
                <el-option
                  v-for="dict in dictMap.CUST_FLAG1"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>

      <!--收款人信息-->
      <el-card class="form-card payeeInfo-card">
        <div slot="header" class="label-header-msg">
          <span>收款人信息</span>
        </div>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payee">
              <el-form-item label="收款行行号" prop="payeeBrno">
                <el-input
                  v-model="form.payeeBrno"
                  placeholder="收款行行号"
                  :disabled="true"
                  @keyup.enter.native="getBankInf('payeeBrno', form.payeeBrno)"
                />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="grid-payee">
              <el-form-item></el-form-item>
            </div>
          </el-col>
          <el-col :span="13">
            <el-form-item label="收款行行名" prop="payeeBrname" label-width="130px">
              <el-input v-model="form.payeeBrname" placeholder="收款行行名" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payee">
              <el-form-item label="收款人开户行号" prop="payeeAccBrno">
                <el-input
                  v-model="form.payeeAccBrno"
                  placeholder="收款人开户行行号"
                  @keyup.enter.native="getBankInf('payeeAccBrno', form.payeeAccBrno)"
                />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="grid-payee">
              <el-button type="primary" icon="el-icon-search" plain @click="openBankBranchDialog('payeeAccBrno')">
                行号查找
              </el-button>
            </div>
          </el-col>
          <el-col :span="13">
            <el-form-item label="收款人开户行行名" prop="payeeAccBrname" label-width="130px">
              <el-input v-model="form.payeeAccBrname" placeholder="收款人开户行行名" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="12">
            <div class="grid-payee">
              <el-form-item label="收款人账号" prop="payeeActno">
                <el-input
                  v-model="form.payeeActno"
                  placeholder="收款人账号"
                  @keyup.enter.native="getActNoInfo('payeeActNo')"
                />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="8">
            <div class="grid-payee">
              <el-button type="primary" icon="el-icon-search" plain @click="openPayeeDialog('payeeActno')">
                账号查找
              </el-button>
            </div>
          </el-col>
        </el-row>
        <el-form-item label="收款人名称" prop="payeeName">
          <el-input v-model="form.payeeName" placeholder="收款人名称" />
        </el-form-item>
        <el-form-item label="收款人地址" prop="payeeAddr">
          <el-input v-model="form.payeeAddr" placeholder="收款人地址" />
        </el-form-item>
      </el-card>
      <!--付款人信息-->
      <el-card class="form-card payerInfo-card">
        <div slot="header" class="label-header-msg">
          <span>付款人信息</span>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="付款人账号" prop="payerActno">
              <el-input
                v-model="form.payerActno"
                placeholder="付款人账号"
                @keyup.enter.native="getActNoInfo('payerActNo')"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-row>
              <el-button type="primary" icon="el-icon-search" plain @click="openPayerDialog('payerActno')">
                账号查找
              </el-button>
            </el-row>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item label="付款人名称" prop="payerName">
            <el-input v-model="form.payerName" placeholder="付款人名称" />
          </el-form-item>
        </el-row>
        <el-row>
          <el-form-item label="付款人地址" prop="payerAddr">
            <el-input v-model="form.payerAddr" placeholder="付款人地址" />
          </el-form-item>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payer">
              <el-form-item label="付款行行号" prop="payerBrno">
                <el-input
                  v-model="form.payerBrno"
                  placeholder="付款行行号"
                  @keyup.enter.native="getBankInf('payerBrno', form.payerBrno)"
                />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="3">
            <el-button type="primary" icon="el-icon-search" plain @click="openBankBranchDialog('payerBrno')">
              行号查找
            </el-button>
          </el-col>
          <el-col :span="13">
            <el-form-item label="付款行行名" prop="payerBrname" label-width="130px">
              <el-input v-model="form.payerBrname" placeholder="付款行行名" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payer">
              <el-form-item label="付款人开户行号" prop="payerAccBrno">
                <el-input
                  v-model="form.payerAccBrno"
                  placeholder="付款人开户行行号"
                  @keyup.enter.native="getBankInf('payerAccBrno', form.payerAccBrno)"
                />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="grid-payer">
              <el-button type="primary" icon="el-icon-search" plain @click="openBankBranchDialog('payerAccBrno')">
                行号查找
              </el-button>
            </div>
          </el-col>
          <el-col :span="13">
            <el-form-item label="付款人开户行行名" prop="payerAccBrname" label-width="130px">
              <el-input v-model="form.payerAccBrname" placeholder="付款人开户行行名" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>

      <div v-if="this.form.bizTypeCode === 'B104'">
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>国库资金借记划拨附加数据域</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="报表日期" prop="reportDate">
                <el-date-picker v-model="form.reportDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="报表序号" prop="reportNumbe">
                <el-input v-model="form.reportNumbe" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="上报国库代码" prop="reportCode">
                <el-input v-model="form.reportCode" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="接收国库代码" prop="receiveCode">
                <el-input v-model="form.receiveCode" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="预算级次" prop="budgetLevel">
                <el-select style="width: 100%" v-model="form.budgetLevel" placeholder="预算级次">
                  <el-option
                    v-for="dict in dictMap.BUDGETLEVELCODE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="预算种类" prop="budgetType">
                <el-select style="width: 100%" v-model="form.budgetType" placeholder="预算种类">
                  <el-option
                    v-for="dict in dictMap.BUDGETLEVELCODE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="调整期标志" prop="indicatorCode">
                <el-select style="width: 100%" v-model="form.indicatorCode" placeholder="调整期标志">
                  <el-option
                    v-for="dict in dictMap.INDICATOR_CODE"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="明细条数" prop="dtlCount">
                <el-input v-model="form.dtlCount" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="明细汇总币种" prop="dtlCurcd">
                <el-input v-model="form.dtlCurcd" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="明细汇总金额" prop="dtlAmount">
                <ht-amount-input v-model="form.dtlAmount" placeholder="明细汇总金额" :disable="true"></ht-amount-input>
              </el-form-item>
            </el-col>
          </el-row>
          <div class="discountReceipt-pick-operate-box">
            <div class="operate-box-bottom-paging">
              <div class="bottom-content">
                <ht-table
                  ref="dataTable104"
                  :showSerialNumber="false"
                  :multi-select="false"
                  :reqConfig="reqConfig104"
                  :queryParams="queryParams"
                  :tableBindColumns="tableBindColumns104"
                  :showRightToolbar="false"
                  :initData="true"
                  :randomRowKey="true"
                ></ht-table>
              </div>
            </div>
          </div>
        </el-card>
      </div>

      <div v-if="this.form.bizTypeCode === 'B307'">
        <el-card class="form-card txnInfo-card">
          <el-row type="flex">
            <div slot="header" class="label-header-msg">
              <span>国库资金国债兑付借记划拨附加数据域</span>
            </div>
            <el-col :span="12">
              <el-form-item label="报表日期" prop="reportDate">
                <el-date-picker v-model="form.reportDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="报表序号" prop="reportNumbe">
                <el-input v-model="form.reportNumbe" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="上报国库代码" prop="reportCode">
                <el-input v-model="form.reportCode" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="接收国库代码" prop="receiveCode">
                <el-input v-model="form.receiveCode" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="明细条数" prop="dtlCount">
                <el-input v-model="form.dtlCount" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="明细汇总币种" prop="dtlCurcd">
                <el-input v-model="form.dtlCurcd" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="明细汇总金额" prop="dtlAmount">
                <ht-amount-input v-model="form.dtlAmount" placeholder="明细汇总金额" :disable="true"></ht-amount-input>
              </el-form-item>
            </el-col>
          </el-row>
          <div class="discountReceipt-pick-operate-box">
            <div class="operate-box-bottom-paging">
              <div class="bottom-content">
                <ht-table
                  ref="dataTable307"
                  :showSerialNumber="false"
                  :multi-select="false"
                  :tableBindColumns="tableBindColumns307"
                  :showRightToolbar="false"
                  :initData="true"
                  :queryParams="queryParams"
                  :reqConfig="reqConfig307"
                  :randomRowKey="true"
                ></ht-table>
              </div>
            </div>
          </div>
        </el-card>
      </div>

      <div v-if="this.form.bizTypeCode === 'B308'">
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>小额支付系统支票截留业务附加数据</span>
          </div>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="出票日期" prop="issueDate">
                <el-date-picker v-model="form.issueDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="提示付款日期" prop="payDate">
                <el-date-picker v-model="form.payDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="票据号码" prop="noteNumber">
                <el-input v-model="form.noteNumber" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="支付密码" prop="payPassword">
                <el-input v-model="form.payPassword" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="24">
              <el-form-item label="用途" prop="use">
                <el-input type="textarea" v-model="form.use" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>

      <div
        v-if="this.form.bizTypeCode === 'B309' || this.form.bizTypeCode === 'B310' || this.form.bizTypeCode === 'B311'"
      >
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>小额支付系统通用票据截留业务附加数据</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="出票日期" prop="issueDate">
                <el-date-picker v-model="form.issueDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="出票货币币种" prop="issueCurrcd">
                <el-input v-model="form.issueCurrcd" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="出票金额" prop="issueAmount">
                <ht-amount-input v-model="form.issueAmount" placeholder="出票金额"></ht-amount-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="提示付款日期" prop="payDate">
                <el-date-picker v-model="form.payDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="票据到期日期" prop="draftMaturity">
                <el-date-picker v-model="form.draftMaturity" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="票据号码" prop="noteNumber">
                <el-input v-model="form.noteNumber" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="支付密码" prop="payPassword">
                <el-input v-model="form.payPassword" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="票据密押" prop="draftKey">
                <el-input v-model="form.draftKey" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="承兑协议编号" prop="protoNo">
                <el-input v-model="form.protoNo" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="承兑日期" prop="acceptDate">
                <el-date-picker v-model="form.acceptDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="承兑人" prop="acceptor">
                <el-input v-model="form.acceptor" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="申请人账号" prop="applyAccount">
                <el-input v-model="form.applyAccount" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="申请人名称" prop="applyName">
                <el-input v-model="form.applyName" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="出票人账号" prop="issueAccount">
                <el-input v-model="form.issueAccount" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="出票人全称" prop="issueName">
                <el-input v-model="form.issueName" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="交易合同号码" prop="pactNumber">
                <el-input v-model="form.pactNumber" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="用途" prop="use">
                <el-input v-model="form.use" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>

      <div
        v-if="
          this.form.bizTypeCode === 'B308' ||
          this.form.bizTypeCode === 'B309' ||
          this.form.bizTypeCode === 'B310' ||
          this.form.bizTypeCode === 'B311'
        "
      >
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>被背书人清单</span>
          </div>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="被背书人数" prop="endorserNumber">
                <el-input v-model="form.endorserNumber" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="原收款人名称" prop="oriPayeeName">
                <el-input v-model="form.oriPayeeName" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="被背书人名称" prop="endorserName">
                <el-input v-model="form.endorserName" />
              </el-form-item>
            </el-col>
          </el-row>

            <ht-table
              ref="dataTableEndorser"
              :showSerialNumber="false"
              :multi-select="false"
              :tableBindColumns="tableBindColumnsEndorser"
              :showRightToolbar="false"
              :initData="true"
              :randomRowKey="true"
              :queryParams="queryParams"
              :reqConfig="reqConfigEndorser"
            ></ht-table>
        </el-card>

        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>票据影像</span>
          </div>

          <el-row type="flex">
            <el-col :span="8">
              <el-form-item label="票据正面图像路径" prop="imgFrnData">
                <el-input type="text" v-model="form.imgFrnFileName" />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label-width="20px">
                <el-form label-width="100px" :model="form" v-if="this.form.imgFrnFileName !== undefined">
                  <el-button type="primary" icon="el-icon-search" plain @click="downloadFile(form.imgFrnData)">
                    下载
                  </el-button>
                </el-form>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="8">
              <el-form-item label="票据背面图像路径" prop="imgBckData">
                <el-input type="text" v-model="form.imgBckFileName" />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item label-width="20px">
                <el-form label-width="100px" :model="form" v-if="this.form.imgBckFileName !== undefined">
                  <el-button type="primary" icon="el-icon-search" plain @click="downloadFile(form.imgBckData)">
                    下载
                  </el-button>
                </el-form>
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>

      <div v-if="this.form.bizTypeCode === 'A119'">
        <el-card class="form-card txnInfo-card">
          <div slot="header" class="label-header-msg">
            <span>广西非票据截留业务附言</span>
          </div>
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="交换日期" prop="chgDate">
                <el-date-picker v-model="form.chgDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="交换场次" prop="chgField">
                <el-input v-model="form.chgField" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="提出交换区域" prop="outRegionid">
                <el-select style="width: 100%" v-model="form.outRegionid" placeholder="提出交换区域">
                  <el-option
                    v-for="dict in dictMap.RegionId"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="提入交换区域" prop="inRegionid">
                <el-select style="width: 100%" v-model="form.inRegionid" placeholder="提入交换区域">
                  <el-option
                    v-for="dict in dictMap.RegionId"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </div>

      <!--回执信息-->
      <el-card class="form-card txnInfo-card">
        <div slot="header" class="label-header-msg">
          <span>回执业务信息</span>
        </div>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="回执交易流水号" prop="rtId">
              <el-input v-model="form.rtId" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="回执报文标识号" prop="rtPkgId">
              <el-input v-model="form.rtPkgId" disabled/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="回执业务状态：" prop="rtBizStatus">
              <el-select v-model="form.rtBizStatus" placeholder="" disabled style="width: 100%">
                <el-option
                  v-for="dict in dictMap.TXN_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="回执通讯状态：" prop="rtStatus">
              <el-select v-model="form.rtStatus" placeholder="" disabled style="width: 100%">
                <el-option
                  v-for="dict in dictMap.PKG_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="交易币种：" prop="curcd2">
              <el-input v-model="form.curcd2" placeholder="" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="结算金额：" prop="amount2">
              <HtAmountInput v-model="form.amount2" placeholder="" :disable="true" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="NPC轧差日期：" prop="rtChkDate">
              <el-date-picker
                v-model="form.rtChkDate"
                type="date"
                disabled
                value-format="yyyyMMdd"
                placeholder=""
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="NPC轧差场次：" prop="chkRound">
              <el-input v-model="form.chkRound" placeholder="" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="业务回执状态：" prop="bizRtStatus">
              <el-select v-model="form.bizRtStatus" placeholder="" disabled style="width: 100%">
                <el-option
                  v-for="dict in dictMap.BIZRT_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="NPC清算日期：" prop="rtClrDate">
              <el-date-picker
                v-model="form.rtClrDate"
                type="date"
                disabled
                value-format="yyyyMMdd"
                placeholder=""
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="业务拒绝处理码：" prop="rejectCode">
              <el-select v-model="form.rejectCode" placeholder="" disabled style="width: 100%">
                <el-option
                  v-for="dict in dictMap.CIS_CODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="业务拒绝原因：" prop="rejectContent">
              <el-input type="textarea" v-model="form.rejectContent" placeholder="" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="回执发送时间：" prop="bizRtSndTime">
              <el-date-picker
                v-model="form.bizRtSndTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder=""
                disabled
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="回执接收时间：" prop="bizRtRcvTime">
              <el-date-picker
                v-model="form.bizRtRcvTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder=""
                disabled
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>

      <query-detail-inter-info
        ref="detailInterInfo"
        :dataDetail="this.form"
        :dictMap="dictMap"
      ></query-detail-inter-info>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="handleClose">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { apiUrlConfigB104, apiUrlConfigB307, apiUrlConfigB309, detail } from "@/api/cnaps/baseBiz/send/sendCommon.js";
import HtAmountInput from "@/views/components/HtAmountInput";
import HtAmountUpper from "@/views/components/HtAmountUpper";
import QueryDetailInterInfo from "./queryDetailInterInfo";
import { apiUrlConfig104, apiUrlConfig307, apiUrlConfigEndorserTab } from "@/api/cnaps/baseBiz/send/beps/beps";
import { amountThousandsFormatter } from "@/utils/table_col_formatter";
import { baseUrlConfig, downloadfile } from "@/api/authority_app/base";

export default {
  name: "QueryDetailDialog",
  components: {
    HtAmountInput,
    HtAmountUpper,
    QueryDetailInterInfo,
  },
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      busTypeList: [],
      id: "",
      pkgNo: "",
      title: "",
      // 是否显示弹出层
      openState: false,

      // 表单参数
      form: {
        amount: "0.00",
      },

      reqConfig104: apiUrlConfigB104,

      reqConfig307: apiUrlConfigB307,

      reqConfigEndorser: apiUrlConfigB309,

      queryParams: {
        id: "",
      },

      //104table
      tableBindColumns104: [
        { prop: "deptCode", label: "征收机关大类代码", dictCode: "DEPT_CODE" },
        { prop: "subjectCode", label: "预算科目代码" },
        { prop: "curcd", label: "发生额币种" },
        { prop: "amount", label: "发生额", type: "price" },
      ],
      //307table
      tableBindColumns307: [
        { prop: "debtBankType", label: "兑付国债银行大类", dictCode: "DEBT_BANK_TYPE127", width: 180 },
        { prop: "capitalCode", label: "本金代码" },
        { prop: "capitalCurcd", label: "本金金额币种", width: 180 },
        { prop: "capitalAmount", label: "本金金额", type: "price" },
        { prop: "accrualCode", label: "利息代码" },
        { prop: "accrualCurcd", label: "利息金额币种", width: 180 },
        { prop: "accrualAmount", label: "利息金额", type: "price" },
      ],
      //背书表格
      tableBindColumnsEndorser: [{ prop: "endorserName", label: "被背书人名称" }],
    };
  },
  mounted() {},
  methods: {

    // 关闭回掉
    handleClose() {
      this.resetForm("queryform111");
      this.$set(this, "form", {});
      this.openState = false;
    },
    show(id, pkgNo) {
      this.openState = true;
      if (id) {
        this.title = "小额普通借记业务明细";
        detail({
          coreId: id,
          pkgNo: pkgNo,
        }).then((res) => {
          this.$set(this, "form", res.result.detail6411DataModel);
          this.$set(this.queryParams, "id", this.form.id);
          this.bizTypeCodeChange(this.form.bizTypeCode);
          if (this.form.imgFrnData !== undefined) {
            let imgFrnFileName = this.form.imgFrnData.split("||");
            if (imgFrnFileName.length > 1) {
              this.$set(this.form, "imgFrnFileName", imgFrnFileName[1]);
            }
          }
          if (this.form.imgBckData !== undefined) {
            let imgBckFileName = this.form.imgBckData.split("||");
            if (imgBckFileName.length > 1) {
              this.$set(this.form, "imgBckFileName", imgBckFileName[1]);
            }
          }
        });
      }
    },
    bizTypeCodeChange(code) {
      //联动修改bizCtgyCode
      let dictKeyPre = `BIZ_CTGY_BEPS_${code}`;
      this.getDicts(dictKeyPre).then((response) => {
        this.busTypeList = response.result;
        this.$set(this.form, "bizCtgyCode", this.busTypeList[0].value);
      });
    },

    cancel() {
      this.openState = false;
    },

    downloadFile(fileId) {
      if (fileId !== "" && fileId !== undefined) {
        downloadfile(`${baseUrlConfig.downloadFile}`, fileId).then((response) => {
          let blob = new Blob([response.data], { type: "image/jpeg" });
          let objectUrl = URL.createObjectURL(blob);
          const link = document.createElement("a"); // 创建a标签
          link.href = objectUrl;
          // const fileNameSplit = response.headers['content-disposition'].split('=')
          // const fileName = decodeURI(fileNameSplit[fileNameSplit.length - 1]) // 跟后端约定好最后一个值为fileName字段
          link.download = fileId.split("||")[1]; // 自定义文件名
          link.click(); // 下载文件
          URL.revokeObjectURL(objectUrl); // 释放内存
        });
      }
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
